# +----------------------------------------------------------------------
# | Pink [ A modern python web framework ]
# +----------------------------------------------------------------------
# | Copyright (c) 2023 http:#unnnnn.com All rights reserved.
# +----------------------------------------------------------------------
# | Author: chenjianhua <unnnnn@foxmail.com>
# +----------------------------------------------------------------------

from .Command import Command


class DownCommand(Command):
    name = 'down'
    description = 'Puts the server in a maintenance state.'
    """
    Puts the server in a maintenance state.

    down
    """

    def handle(self):
        with open(".down", "w+"):
            pass

        self.info("Server is down for maintenance !")
